package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.Customer;
import com.hzncc.flowable_diboot.entity.customer_manage.InternationalCustomerArea;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 客户 VO定义
* @author MyName
* @version 1.0
* @date 2024-06-19
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class CustomerListVO extends Customer  {
private static final long serialVersionUID = 1130554907613520920L;
    /**
    * 客户来源 关联字典选项
    */
    @BindDict(
    type = "customerSource",
    field = "source"
    )
    private LabelValue sourceLabel;

    /**
     * 客户状态 关联字典选项
     */
    @BindDict(
        type = "dealState",
        field = "status"
    )
    private LabelValue statusLabel;

    /**
    * 客户级别 关联字典选项
    */
    @BindDict(
    type = "customer_rank",
    field = "rank"
    )
    private LabelValue rankLabel;

    /**
    * 客户行业 关联字典选项
    */
    @BindDict(
    type = "SAPCustomrBusiness",
    field = "business"
    )
    private LabelValue businessLabel;

    /**
    * 负责人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.principal = id"
     )
    private String principalLabel;

    /**
    * 所属部门 关联信息
    */

    @BindField(
        entity = IamOrg.class,
        field = "name",
       condition = "this.principal = dbt_iam_user.id and dbt_iam_user.org_id = id"
     )
    private String dept;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

    /**
     * 是否关注
     */
    private Boolean isStar;

    /**
     * 国际客户来源渠道 关联字典选项
     */
    @BindDict(type = "internationalCustomerSource", field = "internationalCustomerSource")
    private LabelValue internationalCustomerSourceLabel;

    /**
     * 国际客户跟进状态 关联字典选项
     */
    @BindDict(type = "internationalFollowStatus", field = "internationalFollowStatus")
    private LabelValue internationalFollowStatusLabel;

    /**
     * 国际客户产品类别 关联字典选项
     */
    @BindDict(type = "internationalClientProductType", field = "internationalClientProductType")
    private LabelValue internationalClientProductTypeLabel;

    /**
     * 国际客户类型 关联字典选项
     */
    @BindDict(type = "internationalCustomerType", field = "internationalCustomerType")
    private LabelValue internationalCustomerTypeLabel;

    /**
     * 国际客户询盘质量 关联字典选项
     */
    @BindDict(type = "inquiryQuality", field = "inquiryQuality")
    private LabelValue inquiryQualityLabel;

    /**
     * 创建人 关联信息
     */

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.collaborator = id"
    )
    private String collaboratorLabel;

    /**
     * 国家地区
     */
    @BindField(entity = InternationalCustomerArea.class,
            field = "countryRegion",
            condition = "this.international_customer_area = id")
    private String countryRegion;

    /**
     * 区域划分
     */
    @BindField(entity = InternationalCustomerArea.class,
            field = "areaDivision",
            condition = "this.international_customer_area = id")
    private String areaDivision;

    /**
     *大区
     */
    @BindField(entity = InternationalCustomerArea.class,
            field = "majorArea",
            condition = "this.international_customer_area = id")
    private String majorArea;
}